{template order_header.html}
<script type="text/javascript">
	$(function() {
		$(".table-list tr").last().removeClass("dr_border_none");
	});
</script>
<div class="page-bar">
	<ul class="page-breadcrumb mylink">
		{$menu.link}
	</ul>
	<ul class="page-breadcrumb myname">
		{$menu.name}
	</ul>
	<div class="page-toolbar">
		<div class="btn-group pull-right">
			<button type="button" class="btn green btn-sm btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false" data-hover="dropdown"> {fc_lang('操作菜单')}
				<i class="fa fa-angle-down"></i>
			</button>
			<ul class="dropdown-menu pull-right" role="menu">
				{loop $menu.quick $t}
				<li>
					<a href="{$t.url}">{$t.icon} {$t.name}</a>
				</li>
				{/loop}
				<li class="divider"> </li>
				<li>
					<a href="javascript:window.location.reload();">
						<i class="icon-refresh"></i> {fc_lang('刷新页面')}</a>
				</li>
			</ul>
		</div>
	</div>
</div>

<div class="mytopsearch">
	<form method="post" class="row" action="" name="searchform" id="searchform">
		<input name="search" id="search" type="hidden" value="1" />
		<div class="col-md-12">
			<label>{fc_lang('模块')}</label>
			<label style="padding-right: 5px;"><i class="fa"></i></label>
			<label style="padding-right: 10px;">
				<select name="data[mid]" class="form-control">
					<option value="">{fc_lang('不限')}</option>
					{loop $module $t}
					<option value="{$t.dirname}" {if $param.mid==$t.dirname}selected{/if}>{$t.name}</option>
					{/loop}
				</select>
			</label>
			<label>
				<select name="data[field]" class="form-control">
					{loop $field $t}
					<option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
					{/loop}
				</select>
			</label>
			<label><i class="fa fa-caret-right"></i></label>
			<label style="padding-right: 20px;"><input type="text" class="form-control" placeholder="{fc_lang('多个Id可以用“,”分隔')}" value="{$param['keyword']}" name="data[keyword]" /></label>
			<label>{fc_lang('下单时间')} ：</label>
			<label>{dr_field_input('start', 'Date', array('option'=>array('format'=>'Y-m-d','width'=>'100')), (int)$param.start)}</label>
			<label><i class="fa fa-minus"></i></label>
			<label style="margin-right:10px">{dr_field_input('end', 'Date', array('option'=>array('format'=>'Y-m-d','width'=>'100')), (int)$param.end)}</label>
			<label><button type="submit" class="btn green btn-sm" name="submit" > <i class="fa fa-search"></i> {fc_lang('搜索')}</button></label>
		</div>
	</form>
</div>
<div class="portlet light bordered">
	<div class="portlet-body">
		<div class="table-scrollable v3table">
			<form action="" method="post" name="myform" id="myform">
				<input name="action" id="action" type="hidden" value="" />
				<table class="table dr_table">
					<thead>
					<tr>
						<th></th>
						<th class="{ns_sorting('id')}" name="id" width="160">{fc_lang('订单号')}</th>
						<th class="{ns_sorting('buy_uid')}" name="buy_uid" width="90">{fc_lang('买家')}</th>
						<th class="{ns_sorting('sell_uid')}" name="sell_uid" width="90">{fc_lang('商家')}</th>
						<th class="{ns_sorting('order_price')}" name="order_price">{fc_lang('价格')}</th>
						<th class="{ns_sorting('order_time')}" name="order_time" width="150">{fc_lang('下单时间')}</th>
						<th class="{ns_sorting('status')}" name="status">{fc_lang('状态')}</th>
						<th></th>
					</tr>
					</thead>
					<tbody>
					{loop $list $t}
					<tr>
						<td><input name="ids[]" type="checkbox" class="dr_select toggle md-check" value="{$t.id}" /></td>

						<td><a href="{dr_url('order/home/info', array('id'=>$t.id))}">{$t.sn}</a></td>

						<td><a href="javascript:;" onclick="dr_dialog_member('{$t.buy_uid}')">{dr_strcut($t.buy_username, 10)}</a></td>
						<td><a href="javascript:;" onclick="dr_dialog_member('{$t.sell_uid}')">{dr_strcut($t.sell_username, 10)}</a></td>

						<td>{if $t.order_score}{intval($t.order_price)}{SITE_SCORE}{else}¥{number_format($t.order_price, 2)}{/if}</td>
						<td>{dr_date($t.order_time, '', 'red')}</td>
						<td>{dr_order_status($t)}</td>
						<td class="order_p_table">
							{dr_order_member_option($t.sell_uid, $t)}
							{if $is_transfer && $t['pay_type'] == 3}
							<p><a href="{dr_url('order/transfer/info', array('id'=>$t.id))}" class="btn red btn-xs"> <i class="fa fa-shopping-cart"></i> {fc_lang('转账情况')}</a></p>
							{else}
							<p><a href="{dr_url('order/home/info', array('id'=>$t.id))}" class="btn blue btn-xs"> <i class="fa fa-shopping-cart"></i> {fc_lang('订单详情')}</a></p>
							{/if}
						</td>
					</tr>
					{/loop}
					<tr>
						<th width="20"><input name="dr_select" class="toggle md-check" id="dr_select" type="checkbox" onClick="dr_selected()" /></th>
						<td colspan="99">
							{if $this->ci->is_auth(APP_DIR.'/admin/home/print_info')}
							<label><button type="submit" class="btn blue btn-sm" name="option" onClick="$('#myform').attr('target', '_blank');$('#action').val('print');"> <i class="fa fa-print"></i>  {fc_lang('打印订单')}</button></label>
							{/if}
							{if $this->ci->is_auth(APP_DIR.'/admin/home/del')}<label><button type="button" class="btn red btn-sm" name="option" onClick="$('#action').val('del');dr_confirm_set_all('{fc_lang('您确定要这样操作吗？')}')"> <i class="fa fa-trash"></i> {fc_lang('删除')}</button></label>{/if}
						</td>
					</tr>
					</tbody>
				</table>

			</form>
			<div id="pages"><a>{fc_lang('共%s条', $param.total)}</a>{$pages}</div>
		</div>
	</div>
</div>


{template nfooter.html}